package com.multi.tool.http;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;

public class HttpUtilTest {

    public static void main(String[] args) throws Exception {
        FileInputStream inputStream = null;
        try {
            inputStream = new FileInputStream("/Users/wangzhengpeng/Desktop/Text/text_line.txt");
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));

        String str = null;
        while (true) {
            Thread.sleep(100);
            try {
                if (!((str = bufferedReader.readLine()) != null)) break;
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
//            String doPost = HttpUtil.doPost("http://10.68.48.52:8080/test/ticket/ticketBooking", str);
            String doPost = HttpUtil.doPost("http://10.68.48.52:8080/test/xotasearch1", str);
//            String doPost = HttpUtil.doPost("http://" + IP + ":8080/test/combineBooking1", str);
//            String doPost = HttpUtil.doPost("http://10.68.52.207:8080/test/xlistsearch1", str);
//            String doPost = HttpUtil.doPost("http://10.68.52.186:8080/test/secondSaleTestV2", str);

//            System.out.println("doReq = " + str);
//            String doPost = HttpUtil.doPost("http://10.68.18.100:8080/test/search", str);
//            String doPost = HttpUtil.doPost("http://10.68.35.65:8080/test/booking", str);

            System.out.println("doPost = " + doPost);
        }
    }
}
